-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at scan, implemented linear and ring algorithms #1154
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @avincigu!
I noticed an issue with "in-place" scan (the specification example uses the same source
and dest
buffer). Do you have any other testing in place?
The C11 variants can probably added as well - something like this:
diff --git a/mpp/shmemx.h4 b/mpp/shmemx.h4
index 92b38519..f82729e0 100644
--- a/mpp/shmemx.h4
+++ b/mpp/shmemx.h4
@@ -119,6 +119,19 @@ SHMEM_BIND_C11_RMA(`SHMEM_C11_GEN_IBGET', `, \') \
uint64_t*: shmemx_signal_add \
)(__VA_ARGS__)
+define(`SHMEM_C11_GEN_EXSCAN', ` $2*: shmemx_$1_sum_exscan')dnl
+#define shmemx_sum_exscan(...) \
+ _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG1(__VA_ARGS__)), \
+SHMEM_BIND_C11_RMA(`SHMEM_C11_GEN_EXSCAN', `, \') \
+ )(__VA_ARGS__)
+
+define(`SHMEM_C11_GEN_INSCAN', ` $2*: shmemx_$1_sum_inscan')dnl
+#define shmemx_sum_inscan(...) \
+ _Generic(SHMEM_C11_TYPE_EVAL_PTR(SHMEM_C11_ARG1(__VA_ARGS__)), \
+SHMEM_BIND_C11_RMA(`SHMEM_C11_GEN_INSCAN', `, \') \
+ )(__VA_ARGS__)
The code style is a bit different from typical SOS, at least in collectives.c
. We gravitate towards the Google style guide:
https://google.github.io/styleguide/cppguide.html
Let's chat offline tomorrow, thanks!
The Portals4 testing row looks like a real issue to me, seemingly with the pshmem symbols. |
Looking at the PR, I realize why @davidozog commented on code style. I did not see any issue when we were looking at the code @avincigu. Perhaps, it is the editor you were using. |
Thanks for the comments Dave! I made the changes you suggested. It seems like my editor was adding extra spaces whenever I hit tab. I have fixed it now, please let me know if you see any style issues still. |
No description provided.